#ifndef STRINGCREATOR_H_
#define STRINGCREATOR_H_

#include "String.h"
#include "StringBuffer.h"

class StringBufferCreator
{
	friend class StringCreator;
private:
	StringBufferCreator(){}

public:
	template<class T>
	StringBuffer operator*(T in);
};

class StringCreator
{
private:
	StringCreator(){}

public:
	String operator*(const char* in);  // El parametre d'entrada s'enten esta en UTF-8

	StringBufferCreator& operator*();

	static StringCreator SINGLETON;
};

#define _ StringCreator::SINGLETON *

#include "StringBuffer.h"

template<class T>
StringBuffer StringBufferCreator::operator*(T in)
{
	String a = _ in;
	StringBuffer r;
	r += a;
	return r;
}


#endif
